import axios from '@/libs/api.request'

export const listBookshelf = (wname) => {
  return axios.request({
    url: 'workspaces/' + wname + '/bookshelfs/',
    method: 'get'
  })
}

export const addBookshelf = (wname, name) => {
  return axios.request({
    url: 'workspaces/' + wname + '/bookshelfs/',
    method: 'post',
    data: {
      name
    }
  })
}

export const deleteBookshelf = (wname, name) => {
  return axios.request({
    url: 'workspaces/' + wname + '/bookshelfs/' + name + '/',
    method: 'delete'
  })
}
